home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14758 < prev    next >
Encoding:
Text File  |  1996-08-05  |  924 b   |  41 lines

  1. Path: news.compuserve.com!newsmaster
  2. From: Philippe Verdy <100105.3120@compuserve.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Passing multidemensional arrays to functions?
  5. Date: 2 Apr 1996 00:05:13 GMT
  6. Organization: CompuServe Incorporated
  7. Message-ID: <4jpqvp$lhj@dub-news-svc-6.compuserve.com>
  8. NNTP-Posting-Host: ad15-078.compuserve.com
  9.  
  10. jkohen@einstein.com.ar (Javier Kohen) s'Θcrit :
  11. > John Schell <jschell@aggie.mdn.com> wrote:
  12. > >I am trying to pass a variable to a function but continue to get errors
  13. > >no matter
  14. > >what declaration I give the variable in the prototype statement.
  15. > >The variable:
  16. > >    float variable[1][2]
  17. > >Can you make a sugestion as to what it should pass as?
  18. > >Thanks
  19. > >John
  20. > void    ffunc(float f[1][2])
  21. > {
  22. > }
  23. or also: void ffunc (float (*f)[2]) {...}
  24. because any first dimension size is compatible.
  25.  
  26. > void    main()
  27. > {
  28. >     float    farray[1][2];
  29. >     ffunc(farray);
  30. > }
  31.  
  32.